<template>
    <div>
		<div class="crumbs">
		    <el-breadcrumb separator="/">
		        <el-breadcrumb-item>
		            <i class="el-icon-lx-cascades"></i> 住房统计
		        </el-breadcrumb-item>
		    </el-breadcrumb>
		</div>
		<div class="container">
			<div class="cate_list">
				<span class="cate_title">住房总数:{{totalData['total']}}座</span>
			</div>
			<div class="cate_list">
				<span class="cate_title">结构方式:</span>
				<div class="cate_sum">
					<div class="cate_item" v-for="(item,index) in totalData['structure']" :key="index">
						<span>{{item.structure}}: </span>
						<span>{{item.num}}座</span>
					</div>
				</div>
			</div>
			<div class="cate_list">
				<span class="cate_title">建造年份:</span>
				<div class="cate_sum">
					<div class="cate_item" v-for="(item,index) in totalData['year']" :key="index">
						<span>{{item.year}}:  </span>
						<span>{{item.num}}座</span>
					</div>
				</div>
			</div>
		</div>
    </div>
	
</template>

<script>

export default {
    name: 'houseTotal',
    data() {
        return {
            tableData: [],
			pageIndex: 1,
			pageSize: 10,
			pageTotal: 0,
			totalData:[]
        };
    },
    created() {
		this.getTotal()
    },
    methods: { 
		getTotal() {
			let t = this
			t.$apiPost('House/totals').then(res => {
				if(res.code == 1) {
					this.totalData = res.data
				}
			})
		}
    }
};
</script>
<style scoped>
.cate_list{
	margin: 20px auto;
}
.cate_title{
	margin-bottom: 20upx;
}
.cate_sum{
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}
.cate_item{
	display: flex;
	align-items: center;
	margin: 20px;
	font-size: 15px;
}
.goNew{
	color: #2e6bd9;
	cursor: pointer;
}
.handle-box {
    margin-bottom: 10px;
}
.handle-select {
    width: 120px;
}
.handle-input {
    width: 200px;
    display: inline-block;
}
.table {
    width: 100%;
    font-size: 14px;
}
.red {
    color: #ff0000;
}
.mr5{
	margin-right: 1px;
}
.mr10 {
    margin-right: 10px;
}
.table-td-thumb {
    display: block;
    margin: auto;
    width: 40px;
    height: 40px;
}
</style>
